package com.rock.minibatis.config;

import com.rock.minibatis.mapping.MappedStatement;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class Configuration {

    private JdbcProperties jdbcProperties;
    private Map<String, MappedStatement> mapperMap = new ConcurrentHashMap<String, MappedStatement>();

    public void addMapperStatement(MappedStatement mappedStatement) {
        mapperMap.put(mappedStatement.getId(), mappedStatement);
    }

    public MappedStatement getMappedStatement(String id) {
        return mapperMap.get(id);
    }

    public JdbcProperties getJdbcProperties() {
        return jdbcProperties;
    }

    public void setJdbcProperties(JdbcProperties jdbcProperties) {
        this.jdbcProperties = jdbcProperties;
    }

}

